﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

namespace Admin.NET.Application.Entity;
/// <summary>
/// 托盘实体
/// </summary>
[SugarTable("tray", TableDescription = "母托盘表")]
// 唯一索引
[SugarIndex("uk_{table}", "Encoding", OrderByType.Asc, true)]
// 查询索引
[SugarIndex("index_{table}_name", "Encoding", OrderByType.Asc, "Name", OrderByType.Asc, false)]
public class TrayEntity : EntityTenantBaseData
{
    /// <summary>
    /// 仓库序号
    /// </summary>
    [SugarColumn(ColumnDescription = "仓库序号")]
    public int Tid { get; set; }
    /// <summary>
    /// 托盘编码
    /// </summary>
    [MaxLength(32)]
    [SugarColumn(ColumnDescription = "托盘编码", Length = 32, IsOnlyIgnoreUpdate = true)]
    [Required(ErrorMessage = "托盘编码不为空")]

    public string Encoding { get; set; }
    /// <summary>
    /// 托盘名称
    /// </summary>
    [MaxLength(32)]
    [SugarColumn(ColumnDescription = "托盘名称", Length = 32)]
    [Required(ErrorMessage = "托盘名称不为空")]

    public string Name { get; set; }
    /// <summary>
    /// 托盘类型
    /// </summary>
    [SugarColumn(ColumnDescription = "托盘类型", Length = 100)]
    [Required(ErrorMessage = "托盘类型不能为空")]
    [Enum]
    public TrayEnum Type { get; set; }
    /// <summary>
    /// 托盘规格描述
    /// </summary>
    [MaxLength(100)]
    [SugarColumn(ColumnDescription = "托盘规格", Length = 100)]
    [Required(ErrorMessage = "托盘描述规格需合法")]
    public string Description { get; set; }
    /// <summary>
    /// 当前运行状态
    /// </summary>
    [SugarColumn(ColumnDescription = "状态", DefaultValue = "1")]
    public int Status { get; set; }
    /// <summary>
    /// 是否启用
    /// </summary>
    [SugarColumn(ColumnDescription = "是否启用", DefaultValue = "1")]
    public StatusEnum Isenable { get; set; } = StatusEnum.Enable;

}



/// <summary>
/// 出入库口
/// </summary>
[SugarTable("entranceqndexit", TableDescription = "出入库口")]
// 唯一索引
[SugarIndex("uk_{table}", "Opening", OrderByType.Asc, true)]
// 查询索引
[SugarIndex("index_{table}_name", "Opening", OrderByType.Asc, "Point", OrderByType.Asc, false)]
public class EntranceAndexitEntity : EntityTenantBaseData
{
    /// <summary>
    /// 仓库
    /// </summary>
    [SugarColumn(ColumnDescription = "仓库")]

    public string WarehousCode { get; set; }
    /// <summary>
    /// 出入口
    /// </summary>
    [SugarColumn(ColumnDescription = "出入口")]
    public string Opening { get; set; }
    /// <summary>
    /// 点位
    /// </summary>
    [SugarColumn(ColumnDescription = "点位")]
    public string Point { get; set; }
    /// <summary>
    /// 是否启用
    /// </summary>
    [SugarColumn(ColumnDescription = "是否启用", DefaultValue = "1")]
    [Required(ErrorMessage = "点位坐标不能为空")]

    public StatusEnum Isenable { get; set; } = StatusEnum.Enable;
}

